package com.sskj.gocoin.mine;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.mine.data.TuiguangBean;
import com.sskj.gocoin.p.base.BasePresenter;

public class HBPresenter extends BasePresenter<HBActivity> {
    public void getTuiGuang() {
        OkGo.<HttpData<TuiguangBean>>post(HttpConfig.BASE_URL + HttpConfig.TUIGUANG)
                .execute(new JsonCallBack<HttpData<TuiguangBean>>(this) {
                    @Override
                    protected void _onSuccess(Response<HttpData<TuiguangBean>> response) {
                        HttpData<TuiguangBean> httpData = response.body();
                        if (httpData.getCode() == 200) {
                            mView.onGetTuiguang(httpData.getData());
                        }
                    }
                });
    }
}
